import { lazy } from "react"

const routers = [
    {
        path: '/login',
        component: lazy(() => import('../views/login/login')),
    },
    {
        path: '/registry',
        component: lazy(() => import('../views/registry/registry')),
    },
    {
        path: '/index',
        component: lazy(() => import('../views/home/index')),
        children: [
            {
                path: '/index/home',
                component: lazy(() => import('../views/home/index/index')),
            },
            {
                path: '/index/car',
                component: lazy(() => import('../views/home/car/car')),
            },
            {
                path: '/index/classfly',
                component: lazy(() => import('../views/home/classfly/classfly')),
            },
            {
                path: '/index/my',
                component: lazy(() => import('../views/home/my/my')),
            },
            {
                path: '/index',
                to: "/index/home",
            },
        ]
    },
    {
        path: "/",
        to: '/index',
    },
]

export default routers